{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# survival analysis\n",
    "\n",
    "A set of statistical approaches used to investigate the \"time to event\",\"churn prediction\"\n",
    "- censored data (special missing data type), so can't apply the regression directly\n",
    "- survival function: $ S(t) = Pr(T > t) $\n",
    "- hazard finction: $ \\lambda(t) =\\lim_{\\delta t\\to0}{\\frac{Pr(t\\leq T\\leq t+\\delta t\\mid T>t)}{\\delta t}}= -\\frac{S^\\prime(t)}{S(t)}=\\frac{f(t)}{S(t)} $"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2.134783454153106 0 0.9980276199467129\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl4VOX9/vH3J3vYEkJCCCSQAIEQQFYBcUVRNhGtiqC2uFTUqq3ab61Wq5bW2qoV677WfQWVRRFEwBVRwg5hD1sSICHskD3P748Z/I0xkAmZmWeWz+u6cjnLmZmbw/Hm5DxnniPGGJRSSgWXMNsBlFJKeZ6Wu1JKBSEtd6WUCkJa7kopFYS03JVSKghpuSulVBDScldKqSCk5a6UUkFIy10ppYJQhK0PTkxMNOnp6bY+XimlAtKSJUv2GGOS6lvOWrmnp6eTk5Nj6+OVUiogicg2d5bTwzJKKRWEtNyVUioIabkrpVQQ0nJXSqkgpOWulFJBSMtdKaWCkJa7UkoFIS13pZQKQlruSikVhKx9Q1UFrslzNzTq9Xec38VDSZRSx6N77kopFYS03JVSKghpuSulVBDScldKqSCk5a58xxhSDq6AhU/Blm+gqtx2IqWClp4to7zLGBKPbiSreA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0A/d1/rzVwuxlHrV2Yvri93HC+7N9dXvUTkFOBlYIwxpuTY4y7rqgj4GM8dinSLMeagMeaw8/YsIFJEErG8vlycaPvy+DoTkUgcxf62MeajOhbx3fbl6UGFRg5IROAYSMjg/w/CdK+1zC38fED1A+ft7vx8QDUPzw2oupOrD44BpMxaj7cEop23E4GNeGhgyc1cKS63LwEWmf8/gLPFma+l83aCr3I5l+uKY3BLfLG+XD4jneMPEI7i5wNeP3p7fbmRqT2OMaTBtR5vCjR3ub0QGO7JdeVGtjbH/v5wlOR257pzaxvwVi7n88d2/Jr6Yp05/9xvAE+cYBmfbV8e3Qg8tIJG4hhl3gzc63xsEo69YYAYYIpzY/8R6Ojy2nudr1sPjPBxri+A3cBy588M5+ODgVXOjXsVcL2Pcz0MrHF+/gIgy+W11znX4ybgWl/mct5/EPhXrdd5e329C+wEKnHsLV0P3ATc5HxecFycZrPz8/t7e325kellYJ/LtpXjfLyjcz2tcP4d3+vJdeVmtltdtq9FuPwDVNc24KtczmWuwXGShevrvLbOcBwuM8BKl7+rkba2L/2GqlJKBSF/O+aulFLKA7TclVIqCGm5K6VUENJyV0qpIKTlrpRSQUjLXSmlgpCWu1JKBSEtd6WUCkL/D0FtbXqoIamqAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Weibull disribution\n",
    "%matplotlib inline\n",
    "from scipy import stats\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "sample=stats.weibull_min.rvs(c=2,scale=1,size=300,loc=0) # c:shape parameter, scale: scale parameter\n",
    "#print(sample)\n",
    "\n",
    "#stats.exponweib.fit(sample,floc=0,f0=1)\n",
    "shape,loc,scale=stats.weibull_min.fit(sample,floc=0)\n",
    "print(shape,loc,scale)\n",
    "plt.hist(sample,bins=np.linspace(0,int(max(sample)),20),density=True,alpha=0.5)\n",
    "x=np.linspace(0,int(max(sample)),20)\n",
    "y=[(shape / scale) * (u / scale)**(shape-1) * np.exp(-(u/scale)**shape) for u in x]\n",
    "\n",
    "plt.plot(x,y,label='weibull')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Kaplan-Meier estimate\n",
    "- a non-parametric statistic used to estimate the survival function from lifetime data\n",
    "- \n",
    "$ S(t)=\\prod_{i:t_i\\leq t}(1-\\frac{d_i}{n_i}) $"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   ID Retail date Production date  Group\n",
      "0   1  2014-12-09      2014-10-23      1\n",
      "1   2  2014-12-09      2014-10-17      1\n",
      "2   3  2014-12-14      2014-10-14      1\n",
      "       ID  Mileage Repair date  Censored\n",
      "0  1689.0    82441  2017-08-31         0\n",
      "1  2736.0    66951  2017-08-30         0\n",
      "2  1515.0    75500  2017-07-24         0\n",
      "   ID Retail date Production date  Group  Mileage Repair date  Censored  \\\n",
      "0   1  2014-12-09      2014-10-23      1      NaN  2018-12-19       1.0   \n",
      "1   2  2014-12-09      2014-10-17      1      NaN  2018-12-19       1.0   \n",
      "2   3  2014-12-14      2014-10-14      1  69879.0  2018-05-28       0.0   \n",
      "3   4  2014-12-15      2014-11-11      1  31563.0  2018-08-22       0.0   \n",
      "4   5  2014-12-16      2014-10-20      1      NaN  2018-12-19       1.0   \n",
      "\n",
      "   Operating_days  Operating_time  \n",
      "0            1471              48  \n",
      "1            1471              48  \n",
      "2            1261              41  \n",
      "3            1346              44  \n",
      "4            1464              48  \n",
      "    time  n_censored  n_event  n_risk  hazard_rate  survival_rate  survival  \\\n",
      "6      1         0.0     12.0   10091     0.001189       0.998811  0.998811   \n",
      "7      2         0.0      5.0   10079     0.000496       0.999504  0.998315   \n",
      "8      3         0.0     12.0   10074     0.001191       0.998809  0.997126   \n",
      "9      4         0.0     15.0   10062     0.001491       0.998509  0.995640   \n",
      "10     5         0.0     14.0   10047     0.001393       0.998607  0.994252   \n",
      "\n",
      "    failure_probability  std_error  lower_95_ci  upper_95_ci  \n",
      "6              0.001189   0.000343     0.998138     0.999483  \n",
      "7              0.001685   0.000408     0.997515     0.999115  \n",
      "8              0.002874   0.000533     0.996082     0.998171  \n",
      "9              0.004360   0.000656     0.994354     0.996925  \n",
      "10             0.005748   0.000753     0.992777     0.995727  \n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD8CAYAAABw1c+bAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xd4FNX6wPHv2c2md1KANBIIJbQAAaSKgDQF7IANsWDv5erVq6g/rl7btXKFa7mKgoIFFFABqdJD7yEJpAKpJIT0zfn9MSsGCBAgyaa8n+fZh52ZM7PvGc27Z8/MnKO01gghhGg6TPYOQAghRN2SxC+EEE2MJH4hhGhiJPELIUQTI4lfCCGaGEn8QgjRxEjiF0KIJkYSvxBCNDGS+IUQoolxsHcAp/Pz89OtWrWydxhCCNGgbN68OUtr7V+dsvUu8bdq1YrY2Fh7hyGEEA2KUiqpumWlq0cIIZoYSfxCCNHESOIXQogmRhK/EEI0MedN/Eqpz5RSGUqpXWfZrpRS7yul4pVSO5RS3Sttm6iUOmB7TazJwIUQQlyc6rT4/weMOMf2kUCk7TUZ+A+AUsoXeAnoDfQCXlJK+VxKsEIIIS7deRO/1noVkHOOImOBL7VhPeCtlGoBDAeWaK1ztNa5wBLO/QUihBCiDtTEffxBQEql5VTburOtrxVaa+JyElmdvhxnszMuDi64OLjg7OBMj8AeeDl5UVZRhgkTZpO5tsIQQoh6ryYSv6pinT7H+jMPoNRkjG4iQkNDLyqIvKIyJk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ZHEL4QQTcz/A8cy0ueTMiDvAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#  Kaplan-Meier Estimate, create the life table\n",
    "\n",
    "production=pd.read_excel(\"./data/production.xlsx\",\n",
    "                         parse_dates=['Retail date','Production date'],\n",
    "                         date_parser=lambda x: pd.datetime.strptime(str(x), \"%Y-%m-%d %H:%M:%S\"))\n",
    "failure=pd.read_excel(\"./data/failure.xlsx\",\n",
    "                     parse_dates=['Repair date'],\n",
    "                     date_parser=lambda x:pd.datetime.strptime(str(x),\"%Y-%m-%d %H:%M:%S\"))\n",
    "failure['Censored']=0\n",
    "print(production.head(3))\n",
    "print(failure.head(3))\n",
    "sample_list=production.merge(failure,on='ID',how='left')\n",
    "sample_list['Repair date'].fillna(value=np.max(sample_list['Repair date']),inplace=True)\n",
    "sample_list['Censored'].fillna(value=1,inplace=True)\n",
    "sample_list['Operating_days']=list(map(lambda x: x.days,sample_list['Repair date']-sample_list['Retail date']))\n",
    "sample_list['Operating_time']=sample_list['Operating_days']//30.5\n",
    "print(sample_list.head(5))\n",
    "\n",
    "life_table=sample_list.loc[:,['Operating_time','Censored']].groupby(['Operating_time']).agg({\"Censored\":[\"size\",\"sum\"]}).reset_index()\n",
    "life_table.columns = ['_'.join(col) for col in life_table.columns.values]\n",
    "\n",
    "life_table['n_event']=life_table['Censored_size']-life_table['Censored_sum']\n",
    "life_table=life_table.loc[life_table['Operating_time_']>0,:]\n",
    "life_table.sort_values(by=['Operating_time_'],ascending=False,inplace=True)\n",
    "life_table['n_risk']=life_table['Censored_size'].cumsum()\n",
    "life_table.sort_values(by=['Operating_time_'],ascending=True,inplace=True)\n",
    "life_table.rename(columns={'Operating_time_':'time','Censored_sum':'n_censored'},inplace=True)\n",
    "life_table.drop(columns=['Censored_size'],inplace=True)\n",
    "\n",
    "life_table['hazard_rate']=life_table['n_event']/life_table['n_risk']\n",
    "life_table['survival_rate']=1-life_table['hazard_rate']\n",
    "life_table['survival']=life_table['survival_rate'].cumprod()\n",
    "life_table['failure_probability']=1-life_table['survival']\n",
    "\n",
    "# standard deviation according to Greenwood formula\n",
    "d_i=life_table['n_event']\n",
    "n_i=life_table['n_risk']\n",
    "life_table['std_error']=life_table['survival']*np.sqrt(np.cumsum(d_i/(n_i*(n_i-d_i))))\n",
    "life_table['lower_95_ci']=life_table['survival']-stats.norm.ppf(1-.05/2)*life_table['std_error']\n",
    "life_table['upper_95_ci']=life_table['survival']+stats.norm.ppf(1-.05/2)*life_table['std_error']\n",
    "print(life_table.head(5))\n",
    "plt.plot(life_table['time'],life_table['survival'])\n",
    "plt.plot(life_table['time'],life_table['lower_95_ci'], linestyle='dashed')\n",
    "plt.plot(life_table['time'],life_table['upper_95_ci'], linestyle='dashed')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# weibull regression\n",
    "- Parametric regression model for survival data\n",
    "- univariate regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Weibull model train finished with score: 97.11571195761121%\n",
      "Weight: 1.551033921803207, Bias: -7.779230574903931\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAE4CAYAAAB47tUIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3XlA1HX++PHnzMAAw40IiAioeN+ipQJmpna5HmXp12y3ds12t9qtvm25323L1m9b3992bWatqbXVtpZlUml50IYHCHngfSAqh+KogDicMwMzvz9GRkbOgRmYkdfjL/nM5zOfF59BXrzPl8JsNpsRQgghHET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gAgopFoIgCCKgkGIhCIIgAgopFoIgCCKgkGIhCIIgAgopFoIgCCKg/AeWDEuXjWo2nAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn import linear_model\n",
    "import logging\n",
    "\n",
    "class Input_builder(object):\n",
    "    def __init__(self):\n",
    "        pass\n",
    "\n",
    "    def __call__(self, model,x,y=None,train_window=20,train_window_2=None):\n",
    "        if model=='weibull':\n",
    "            return self.create_weibull_input(x,y,train_window)\n",
    "        elif model=='svm' or model=='lstm':\n",
    "            return self.create_RNN_input(x,train_window=20)\n",
    "        elif model=='seq2seq':\n",
    "            return self.create_seq2seq_basic_input(x,train_window,train_window_2)\n",
    "        elif str(model)=='arima':\n",
    "            return x.iloc[:,-1].values\n",
    "        elif str(model)=='xgb':\n",
    "            return self.create_xgb_input(x)\n",
    "\n",
    "    def create_weibull_input(self,x,y,train_windows=20):\n",
    "        index_end=len(y)-1\n",
    "        y=list(y)\n",
    "        for yy in y[::-1]:\n",
    "            if yy!=y[-1]:\n",
    "                index_end=y.index(yy)\n",
    "                break\n",
    "        index_begin=index_end-train_windows if (index_end-train_windows>0) else 1\n",
    "        x,y=x[index_begin:index_end],y[index_begin:index_end]\n",
    "        logging.info(\"Weibull train data {}\".format(len(x)))\n",
    "        return np.array(x),np.array(y)\n",
    "        \n",
    "        \n",
    "alpha=10e-7\n",
    "class Weibull_model(object):\n",
    "    def __init__(self):\n",
    "        pass\n",
    "\n",
    "    def train(self,x,y,train_window):\n",
    "        self.x = x\n",
    "        self.y = y\n",
    "        train_x, train_y = Input_builder().create_weibull_input(x, y, train_windows=train_window)\n",
    "        self.x_weibull = np.log(train_x)\n",
    "        self.y_weibull = np.log(-np.log(1 - train_y) + alpha)\n",
    "        self.x_weibull=self.x_weibull.reshape(-1,1)\n",
    "        self.model=linear_model.LinearRegression()\n",
    "        self.model.fit(self.x_weibull,self.y_weibull)\n",
    "        print(\"Weibull model train finished with score: {}%\".format(100*self.model.score(self.x_weibull,self.y_weibull)))\n",
    "        self.weight_weibull=self.model.coef_[0]\n",
    "        self.bias_weibull=self.model.intercept_\n",
    "        print(\"Weight: %s, Bias: %s\" % (self.weight_weibull,self.bias_weibull))\n",
    "        return self.weight_weibull,self.bias_weibull\n",
    "\n",
    "    def predict_by_interval(self,predicted_interval,return_full=True):\n",
    "        x_max=max(self.x)\n",
    "        #assert x_max< (len(self.x)+5)\n",
    "        x_future=[i for i in np.arange(x_max+1,x_max+predicted_interval+1)]\n",
    "        x_future_weibull=np.log(x_future).reshape(-1,1)\n",
    "        y_predict_weibull=self.weight_weibull*x_future_weibull+self.bias_weibull\n",
    "        y_predict=1.0-1.0/(np.exp(np.exp(y_predict_weibull-alpha)))\n",
    "        y_predict=y_predict.reshape(y_predict.shape[0],)\n",
    "\n",
    "        if return_full:\n",
    "            self.x_future = list(self.x) + list(x_future)\n",
    "            self.y_future = list(self.y) + list(y_predict)\n",
    "            return self.x_future, self.y_future\n",
    "        else:\n",
    "            return list(x_future),list(y_predict)\n",
    "\n",
    "\n",
    "    def predict_by_calendar(self,interval_samples,calendar_failures,predicted_interval,output_file,return_full=True,include_future_samples=False):\n",
    "        \"\"\"\n",
    "        interval_samples: [sample0,sample1,sample2] cumulative value for each operating time\n",
    "        calendar_failures: {Date1: failure1,Date2: failure2}\n",
    "        \"\"\"\n",
    "        x_future,y_future=self.predict_by_interval(predicted_interval+1)\n",
    "        failure_rate_interval =[y_future[i+1]-y_future[i] for i in range(len(y_future)-1)]\n",
    "        failure_rate_interval=[max(alpha,x) for x in failure_rate_interval]\n",
    "        logging.info(\"Use {} data to further predict {} future\".format(len(interval_samples),predicted_interval))\n",
    "        assert len(interval_samples)+predicted_interval==len(failure_rate_interval)\n",
    "\n",
    "        if return_full:\n",
    "            pass\n",
    "        else:\n",
    "            calendar_failures=pd.DataFrame()\n",
    "\n",
    "        if include_future_samples:\n",
    "            #Todo : check if it's better or not\n",
    "            samples_future=interval_samples+[np.mean(interval_samples)]*predicted_interval\n",
    "\n",
    "        else:\n",
    "            for i in range(1,predicted_interval+1):\n",
    "                samples_failure_rate_interval=failure_rate_interval[i:i+len(interval_samples)]\n",
    "                failure_interval=sum(interval_samples*samples_failure_rate_interval)\n",
    "                calendar_failures=calendar_failures.append({\"Failures\":failure_interval},ignore_index=True)\n",
    "        calendar_failures.to_csv(output_file,index=False)\n",
    "        return calendar_failures\n",
    "\n",
    "    def plot(self):\n",
    "        plt.style.use('ggplot')\n",
    "        fig,ax=plt.subplots()\n",
    "        x, y = np.array(self.x), np.array(self.y)\n",
    "        x_weibull,y_weibull=np.log(x),np.log(-np.log(1 - y) + alpha)\n",
    "        ax.plot(x_weibull,y_weibull,marker='o',linestyle='')\n",
    "        x_plot = np.arange(np.log(1), np.log(len(x)), np.log(2))\n",
    "        ax.plot(x_plot,self.weight_weibull*x_plot+self.bias_weibull,'--',linewidth=2)\n",
    "\n",
    "        ax.set_yticks(list(map(lambda y: np.log(-np.log(1 - y) + alpha),np.array([0.01,0.05]+[i/100 for i in range(10,100,20)]))))\n",
    "        ax.set_yticklabels(np.array([1, 5] + [i for i in range(10, 100, 20)]), fontsize=15)\n",
    "        ax.set_xticks(list(map(lambda x: np.log(x),[i*10 for i in range(1, 10)])))\n",
    "        ax.set_xticklabels([i*10 for i in range(1, 10)])\n",
    "        ax.set_xlim([1, np.log(len(self.x)+10)])\n",
    "        ax.tick_params(axis='both', which='major', labelsize=15)\n",
    "        ax.set_xlabel('Operating months', fontsize=25)\n",
    "        ax.set_ylabel('Failure probability [%]', fontsize=25)\n",
    "        plt.show()\n",
    "\n",
    "        \n",
    "x,y=life_table['time'].values,life_table['failure_probability'].values\n",
    "weibull_model = Weibull_model()\n",
    "weibull_model.train(x,y,train_window=50)\n",
    "x_full_pred,y_full_pred=weibull_model.predict_by_interval(predicted_interval=len(x),return_full=False)\n",
    "weibull_model.plot()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# log-rank test\n",
    "- To compare the survival times of two or more groups\n",
    "- univariate analysis for categorical groups"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# cox proportional hazards regression\n",
    "- To describe the effect of categorical or quantitative variables on survival\n",
    "- assume that the effects of the predictor variables upon survival are constant over time and are additive in one scale, the hazard for any individual is a fixed proportion of the hazard for any other individual\n",
    "- A semi-parametric model, multivariate regression\n",
    "- $ h(t|x)=h_0(t) \\times exp(b_1x_1+b_2x_2+ \\ldots +b_px_p) $ \n",
    "- Cumulative hazard at a time t is the risk of dying between time 0 and time t, and the survivor function at time t is the probability of surviving to time t\n",
    "- cox regression aims to estimate the hazard ratio, while logistic regression aims to estimate the odds ratio\n",
    "- [reference](http://courses.washington.edu/b515/l17.pdf)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# tree based survival model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# mixed weibull"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Bayesian restoration maximization\n",
    "- [Bayesian estimation of Weibull mixture in heavily censored data setting](https://hal.archives-ouvertes.fr/hal-01645618/document)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
